package com.wwtech.epp.ui.activity.friend.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.friend.ConversationActivity;
import com.wwtech.epp.ui.activity.friend.contract.ConversationContract;
import com.wwtech.epp.ui.activity.friend.presenter.ConversationPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.friend
 * @Description: The moduele of ConversationActivity, provide field for ConversationActivity
 * @date 2017/09/03 10:32:00
 */
@Module
public class ConversationModule {
    private final ConversationContract.View mView;


    public ConversationModule(ConversationContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public ConversationPresenter provideConversationPresenter(HttpAPIWrapper httpAPIWrapper, ConversationActivity mActivity) {
        return new ConversationPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public ConversationActivity provideConversationActivity() {
        return (ConversationActivity) mView;
    }
}